home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume10 / sun.serpatch / part01 next >
Encoding:
Internet Message Format  |  1990-10-25  |  9.2 KB

  1. Path: uunet!samsung!sol.ctr.columbia.edu!lll-winken!sun-barr!newstop!sun!langue.is.tsukuba.ac.jp
  2. From: ntakahas@langue.is.tsukuba.ac.jp (TAKAHASHI Naoto)
  3. Newsgroups: comp.sources.x
  4. Subject: v10i023: Xsun for CG8/CG9, Part01/02
  5. Message-ID: <csx-10i023:sun.serpatch@uunet.UU.NET>
  6. Date: 25 Oct 90 17:58:12 GMT
  7. Sender: news@sun.Eng.Sun.COM
  8. Lines: 270
  9. Approved: argv@sun.com
  10.  
  11. Submitted-by: ntakahas@langue.is.tsukuba.ac.jp (TAKAHASHI Naoto)
  12. Posting-number: Volume 10, Issue 23
  13. Archive-name: sun.serpatch/part01
  14.  
  15. [ moderator's note:
  16.     This is a virtual repost of volume 9, issue 13.  It contains patches
  17.     for the Xsun X11R4 server to support the GC8 and 9 framebuffer.
  18.     This is an updated version of that patch.  It is not an official
  19.     MIT patch, but its usefulness merits its posting.  --dan
  20. ]
  21.  
  22. Here is a new Xsun for CG8/CG9. Now you can draw on the monochome
  23. screen any time you want. And it works faster in text drawing and
  24. window moving. So put my previous server to /dev/null and use this.
  25. The patches should be applied to the MIT version of X11R4, not to my
  26. previous one. Hope you like it.
  27.  
  28. TAKAHASHI Naoto
  29. Doctoral Program in Engineering, University of Tsukuba
  30. ntakahas@is.tsukuba.ac.jp
  31.  
  32. ----------------------------------------------------------------------
  33. #! /bin/sh
  34. # This is a shell archive.  Remove anything before this line, then unpack
  35. # it by saving it into a file and typing "sh file".  To overwrite existing
  36. # files, type "sh file -c".  You can also feed this as standard input via
  37. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  38. # will see the following message at the end:
  39. #        "End of shell archive."
  40. # Contents:  CHANGES README VERSION X.sample cg9.diff doit.sh
  41. # Wrapped by ntakahas@langue on Thu Oct  4 07:19:44 1990
  42. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  43. if test -f 'CHANGES' -a "${1}" != "-c" ; then 
  44.   echo shar: Will not clobber existing file \"'CHANGES'\"
  45. else
  46. echo shar: Extracting \"'CHANGES'\" \(293 characters\)
  47. sed "s/^X//" >'CHANGES' <<'END_OF_FILE'
  48. X90/09/03    Complete two screen support. You are not bothered by
  49. X        the `shade' of the monochrome screen any more.
  50. X
  51. X90/09/15    cfbmskbits.h was shaped up for 32bit/pixel.
  52. X        pixrect code was inserted in cfbbitblt.c and sunInit.c.
  53. X
  54. X90/09/16    cfbtegblt.c and cfbbitblt.c were optimised for 32bit/pixel.
  55. END_OF_FILE
  56. if test 293 -ne `wc -c <'CHANGES'`; then
  57.     echo shar: \"'CHANGES'\" unpacked with wrong size!
  58. fi
  59. # end of 'CHANGES'
  60. fi
  61. if test -f 'README' -a "${1}" != "-c" ; then 
  62.   echo shar: Will not clobber existing file \"'README'\"
  63. else
  64. echo shar: Extracting \"'README'\" \(2353 characters\)
  65. sed "s/^X//" >'README' <<'END_OF_FILE'
  66. XThis is my new version of the Xsun for CG8/CG9 24-bit colour boards.
  67. XCall this version 1.0 and forget about my previous patch.
  68. X
  69. XThe code was tested on the following platforms:
  70. X
  71. XSun4/330GXP SunOS 4.0.3 with Sun cc
  72. XSun4/110TC  SunOS 4.1   with Sun cc
  73. XSun3/80 TFC SunOS 4.0.3 with gcc1.35, gcc1.37.1
  74. X
  75. XIt supports CG8 and CG9 (and BW2, of course).  Other colour boards,
  76. Xsuch as CG4 and CG6, are NOT supported.  See the file named X.sample
  77. Xif you want your /usr/bin/X11 directory to be shared by both 8-bit
  78. Xcolour systems and 24-bit colour systems.
  79. X
  80. XLike a CG4 server, it has two screens: a colour screen (screen 0) and
  81. Xa monochrome screen (screen 1).  The screens toggle when the mouse
  82. Xcursor goes off the side edges.
  83. X
  84. X
  85. XHOW TO MAKE
  86. X
  87. XThis patch should be applied to the MIT release of X11R4, not to my
  88. Xprevious patch. It seems that the official patch level does not
  89. Xmatter.
  90. X
  91. X1. Copy `cg8.diff', `cg9.diff',  and `doit.sh' to $(TOP)/mit/server.
  92. X
  93. X2. cd to $(TOP)/mit/server.
  94. X
  95. X3. Run `doit.sh'.  The patches will be applied and the sources will be
  96. Xcompiled automatically.
  97. X
  98. X4. Test the new Xsun by `xinit -- ./Xsun'.
  99. X
  100. X5. If everything seems OK, replace the old Xsun with the new one.
  101. X
  102. X
  103. XABOUT CLIENTS
  104. X
  105. XThis server is a TrueColor server.  So the clients which dynamically
  106. Xchange the colormap do not work.
  107. X
  108. XMost of the MIT clients work fine.  Unfortunately, however, some
  109. Xclients do not run with this server.  Ico does not work when more than
  110. Xone colour is specified for -colors option.  Xfade does not support
  111. Xthe TrueColor visual type.  Xterm, xbiff, xclock, oclock, twm, xmag,
  112. Xetc. work fine.  Xcolors is attractive.
  113. X
  114. XIf you are a twm user, do not forget to set XORvalue to 16777215 (=
  115. X2^24 - 1) in your .twmrc, or the window outlines for moving and
  116. Xresizing are not visible.
  117. X
  118. XUser contributed clients may or may not work.  Xphoon works, but it
  119. Xtakes relatively long time to start up and to redraw the root window.
  120. XXothello works fine, except that when you play black your tile cannot
  121. Xbe seen until you put it on the board.  Xtartan looks good.  Emacs
  122. Xwith the X11 functionality works fine.  Olwm works to some extent.
  123. X
  124. X
  125. XThis version is faster than my previous one, but I'm not satisfied
  126. Xwith the performance.  Anyone is welcome to inprove it.
  127. X
  128. XEnjoy.
  129. X
  130. X- ntakahas
  131. X
  132. XTAKAHASHI Naoto
  133. XDoctoral Program in Engineering, University of Tsukuba
  134. Xntakahas@is.tsukuba.ac.jp
  135. END_OF_FILE
  136. if test 2353 -ne `wc -c <'README'`; then
  137.     echo shar: \"'README'\" unpacked with wrong size!
  138. fi
  139. # end of 'README'
  140. fi
  141. if test -f 'VERSION' -a "${1}" != "-c" ; then 
  142.   echo shar: Will not clobber existing file \"'VERSION'\"
  143. else
  144. echo shar: Extracting \"'VERSION'\" \(32 characters\)
  145. sed "s/^X//" >'VERSION' <<'END_OF_FILE'
  146. XThis patch set is version 1.00.
  147. END_OF_FILE
  148. if test 32 -ne `wc -c <'VERSION'`; then
  149.     echo shar: \"'VERSION'\" unpacked with wrong size!
  150. fi
  151. # end of 'VERSION'
  152. fi
  153. if test -f 'X.sample' -a "${1}" != "-c" ; then 
  154.   echo shar: Will not clobber existing file \"'X.sample'\"
  155. else
  156. echo shar: Extracting \"'X.sample'\" \(286 characters\)
  157. sed "s/^X//" >'X.sample' <<'END_OF_FILE'
  158. X#!/bin/sh
  159. X# If your /usr/bin/X11 directory is shared by both 8-bit colour systems
  160. X# and 24-bit colour systems, install the 24-bit server as /usr/bin/X11/Xsun24
  161. X# and use this shell script as /usr/bin/X11/X
  162. Xif [ `constype` = rop -o `constype` = bw4 ]; then
  163. X  Xsun24 $@
  164. Xelse
  165. X  Xsun $@
  166. Xfi
  167. END_OF_FILE
  168. if test 286 -ne `wc -c <'X.sample'`; then
  169.     echo shar: \"'X.sample'\" unpacked with wrong size!
  170. fi
  171. chmod +x 'X.sample'
  172. # end of 'X.sample'
  173. fi
  174. if test -f 'cg9.diff' -a "${1}" != "-c" ; then 
  175.   echo shar: Will not clobber existing file \"'cg9.diff'\"
  176. else
  177. echo shar: Extracting \"'cg9.diff'\" \(1842 characters\)
  178. sed "s/^X//" >'cg9.diff' <<'END_OF_FILE'
  179. Xdiff -arcN server/ddx/sun/Imakefile cg9/ddx/sun/Imakefile
  180. X*** server/ddx/sun/Imakefile    Sun Sep 16 23:48:03 1990
  181. X--- cg9/ddx/sun/Imakefile    Sun Sep 16 23:44:03 1990
  182. X***************
  183. X*** 9,14 ****
  184. X--- 9,15 ----
  185. X      sunMouse.c \
  186. X      sunUtils.c \
  187. X      sunCG8C.c \
  188. X+     sunCG9C.c \
  189. X      sunKeyMap.c
  190. X  
  191. X  SRCS =    $(SRCS1) kbd_mode.c constype.c 
  192. X***************
  193. X*** 23,28 ****
  194. X--- 24,30 ----
  195. X      sunMouse.o \
  196. X      sunUtils.o \
  197. X      sunCG8C.o \
  198. X+     sunCG9C.o \
  199. X      sunKeyMap.o
  200. X  
  201. X     INCLUDES = -I. -I../mfb -I../mi -I../../include -I$(INCLUDESRC)
  202. Xdiff -arcN server/ddx/sun/sunCG9C.c cg9/ddx/sun/sunCG9C.c
  203. X*** server/ddx/sun/sunCG9C.c    Tue Sep 25 21:50:30 1990
  204. X--- cg9/ddx/sun/sunCG9C.c    Sun Sep 16 23:44:05 1990
  205. X***************
  206. X*** 444,450 ****
  207. X      int         fd;
  208. X      struct fbtype fbType;
  209. X  
  210. X!     if ((fd = sunOpenFrameBuffer(FBTYPE_MEMCOLOR, &fbType, index, fbNum,
  211. X                   argc, argv)) < 0)
  212. X      return FALSE;
  213. X  
  214. X--- 444,450 ----
  215. X      int         fd;
  216. X      struct fbtype fbType;
  217. X  
  218. X!     if ((fd = sunOpenFrameBuffer(FBTYPE_SUNROP_COLOR, &fbType, index, fbNum,
  219. X                   argc, argv)) < 0)
  220. X      return FALSE;
  221. X  
  222. Xdiff -arcN server/ddx/sun/sunInit.c cg9/ddx/sun/sunInit.c
  223. X*** server/ddx/sun/sunInit.c    Sun Sep 16 23:50:06 1990
  224. X--- cg9/ddx/sun/sunInit.c    Sun Sep 16 23:44:04 1990
  225. X***************
  226. X*** 59,64 ****
  227. X--- 59,65 ----
  228. X  extern int sunKbdProc();
  229. X  extern Bool sunBW2Probe(), sunBW2Create();
  230. X  extern Bool sunCG8CProbe(), sunCG8CCreate();
  231. X+ extern Bool sunCG9CProbe(), sunCG9CCreate();
  232. X  extern void ProcessInputEvents();
  233. X  
  234. X  extern void SetInputCheck();
  235. X***************
  236. X*** 103,108 ****
  237. X--- 104,110 ----
  238. X  sunFbDataRec sunFbData[] = {
  239. X      sunBW2Probe,      "/dev/bwtwo0",        sunBW2Create,
  240. X      sunCG8CProbe,      "/dev/cgeight0",    sunCG8CCreate,
  241. X+     sunCG9CProbe,      "/dev/cgnine0",        sunCG9CCreate,
  242. X      sunBW2Probe,      "/dev/bwtwo0",        sunBW2Create,
  243. X  };
  244. X  
  245. END_OF_FILE
  246. if test 1842 -ne `wc -c <'cg9.diff'`; then
  247.     echo shar: \"'cg9.diff'\" unpacked with wrong size!
  248. fi
  249. # end of 'cg9.diff'
  250. fi
  251. if test -f 'doit.sh' -a "${1}" != "-c" ; then 
  252.   echo shar: Will not clobber existing file \"'doit.sh'\"
  253. else
  254. echo shar: Extracting \"'doit.sh'\" \(307 characters\)
  255. sed "s/^X//" >'doit.sh' <<'END_OF_FILE'
  256. X#!/bin/sh
  257. Xsed -e 's/CG4/CG8/g' -e 's/cg4/cg8/g' ddx/sun/sunCG4C.c > ddx/sun/sunCG8C.c
  258. Xpatch -p1 < cg8.diff
  259. Xif [ -f /usr/include/sundev/cg9reg.h ]; then
  260. X  sed -e 's/CG8/CG9/g' -e 's/cg8/cg9/g' ddx/sun/sunCG8C.c > ddx/sun/sunCG9C.c
  261. X  patch -p1 < cg9.diff
  262. Xfi
  263. Xmake Makefile
  264. Xmake Makefiles
  265. Xmake depend
  266. Xmake Xsun
  267. END_OF_FILE
  268. if test 307 -ne `wc -c <'doit.sh'`; then
  269.     echo shar: \"'doit.sh'\" unpacked with wrong size!
  270. fi
  271. chmod +x 'doit.sh'
  272. # end of 'doit.sh'
  273. fi
  274. echo shar: End of shell archive.
  275. exit 0
  276.  
  277. dan
  278. ----------------------------------------------------
  279. O'Reilly && Associates   argv@sun.com / argv@ora.com
  280. Opinions expressed reflect those of the author only.
  281.